package util;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class MysqlUtil {
    private static final String JBDC="com.mysql.jbdc.Driver";//jbdc的驱动程序
    private static final String DB_URl="jbdc:mysql://127.0.0.1:3306/test_project?useSSL=false&allowPublicKeyRetrieval=ture&serverTimezone=UTC";
    private static final String DB_USER="root";
    private static final String DB_PASSWORD="root";
    public static Statement JBDC(){
try{
    Class.forName(JBDC);
    Connection connection=DriverManager.getConnection(DB_URl,DB_USER,DB_PASSWORD);
    Statement statement=connection.createStatement();
    return statement;
}catch(Exception e){
    throw new RuntimeException(e);
}
    }
}
